package visitor;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Context {
    private final List<Bill> list = new ArrayList<>();

    public void accept(Formatter formatter) {
        for (Bill bill : list) {
            bill.accept(formatter);
        }
    }

    public void addBill(Bill bill) {
        list.add(bill);
    }

    public void remove(Bill bill) {
        list.remove(bill);
    }

}
